home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group03a.txt
/
000050_icon-group-sender_Wed Mar 26 12:54:54 2003.msg
< prev
next >
Wrap
Internet Message Format
|
2003-12-22
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id h2QJsr208601
for icon-group-addresses; Wed, 26 Mar 2003 12:54:53 -0700 (MST)
Message-Id: <200303261954.h2QJsr208601@baskerville.CS.Arizona.EDU>
X-Sender: whm@mail.mse.com (Unverified)
Date: Wed, 26 Mar 2003 10:35:55 -0700
To: voice_of_reason@australia.edu (Quiet Voice)
From: "William H. Mitchell" <whm86@mse.com>
Subject: Re: newbie questions -- ressurected
Cc: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
At 06:20 AM 3/26/03 -0800, Quiet Voice wrote:
>Thank you for this response and to all who have responded directly by
>e:mail. The suggestions were all helpful and did solve the problem.
>
>The next level of dilemma: I would like to sort the list.
>
>I've tried various permutations of code using the sort() function. The
>errors I get seeme to be related to a type mis-match caused by the
>output type of sort().
>
>Example
>
>write(!sort(data,2))
sort(t,2) produces a list of two-element lists ([key,value] pairs) ordered
by the values.
I suspect the problem you're seeing is that you're trying to write() a list
and unfortunately, that's not allowed (no structure types are valid as
arguments to write). I usually do something like this:
every pair := !sort(data,2) do
write(pair[1], " ", pair[2])
William Mitchell
Mitchell Software Engineering
www.mse.com